package cate.game.power;

import cate.common.table.d.GDCamp;
import cate.game.attr.FightAttr;
import cate.game.attr.PowerAttrPart;
import cate.game.role.Role;

import java.util.HashMap;
import java.util.Map;

public class RaceBadgePowerFactor {
    /** 世界之树职业祝福属性 */
    public Map<Byte, FightAttr> campAttr;

    public RaceBadgePowerFactor(Role role) {
        if(role == null){
            return;
        }
        campAttr = new HashMap<>();
        for (byte camp : GDCamp.Type.getAllCamps(false)) {
            FightAttr attr = role.getRes().raceBadge.getCampAttr(camp);
            campAttr.put(camp, attr);
        }
    }

    public PowerAttrPart buildHeroPart(byte camp){
        PowerAttrPart part = new PowerAttrPart();
        if(campAttr != null){
            part.attr = campAttr.get(camp).copy();
        }
        return part;
    }


}
